'''
Created on 12/06/2010

@author: kivson
'''

class ConverteBin(object):
    '''
    Conversor de e para binario
    '''


    def __init__(self):
        '''
        Constructor
        '''
    def toBin(self,num):
        resp = [int(i) for  i in bin(num)[2:]]
        saida = [0]*(8-len(resp))
        saida.extend(resp)
        return saida
    
    def toDec(self, num, base=2):
        return int(num,base)
    
if __name__=="__main__":
    
    conv = ConverteBin()
    print conv.toBin(10)